<template>
  <div>index</div>
  <hr />
  <h1>link</h1>
  <p class="links">
    <NuxtLink to="/user">user Page</NuxtLink>
    <NuxtLink to="/data/test">data test Page</NuxtLink>
    <NuxtLink to="/testVue">test Vue page</NuxtLink>
  </p>
  <hr />
  <p>
    <button @click="showCounter = !showCounter">
      {{ !showCounter ? "显示Counter" : "显示TextTip" }}
    </button>
  </p>
  <hr />
  <KeepAlive :include="keep.include">
    <Counter v-if="showCounter" />
    <TextTip v-else />
  </KeepAlive>
</template>
<script setup lang="ts">
const showCounter = ref(false);
const keep = {
  include: ["Counter"],
};
// defineOptions({
//   name: "IndexPage",
// });
</script>
<style scoped>
.links a {
  padding: 10px;
}
</style>
